﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<List<ReserveringView>>" %>
<%@ Import namespace="ICT4Events.Models" %>
<%@ Import namespace="ICT4Events" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Reserveringen
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Reserveringen</h2>

<%
    if (ViewData.Model == null)
    {
        %>
        Er zijn geen reserveringen geregistreerd. <br />
        <%
    }
    else
    {
        %>
    
    <table>
        <tr>
            <th></th>
            <th>
                Code
            </th>
        </tr>
        <%foreach (ReserveringView r in (IEnumerable<ReserveringView>)ViewData.Model)
          {%>
        <tr>
            <td>
                <%= Html.ActionLink("Details", "DetailsReservering", new { id = r.Reserveringsnummer })%>
            </td>
            <td>
                <%= Html.Encode(r.Naam)%>
            </td>
        </tr>
  <%}
    } %>
</table>
    <br/>
        <%= Html.ActionLink("Reservering toevoegen", "NieuweReservering") %>

</asp:Content>
